package com.xbongbong.pro.eureka;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

/**
 * @author kaka
 */
@EnableEurekaServer
@SpringBootApplication
public class ProEurekaApplication /*extends WebSecurityConfigurerAdapter*/ {

	private static final Logger LOG = LoggerFactory.getLogger(ProEurekaApplication.class);

	public static void main(String[] args) {
		try {
			SpringApplication.run(ProEurekaApplication.class, args);
		} catch (Exception e) {
			LOG.error("ProEurekaApplication启动报错:", e);
		}
	}

//	@Override
//	protected void configure(HttpSecurity http) throws Exception {
//		// Configure HttpSecurity as needed (e.g. enable http basic).
//		http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER);
//		http.csrf().disable();
//		//注意：为了可以使用 http://${user}:${password}@${host}:${port}/eureka/ 这种方式登录,所以必须是httpBasic,
//		// 如果是form方式,不能使用url格式登录
//		http.authorizeRequests().anyRequest().authenticated().and().httpBasic();
////		super.configure(http);
//	}
}
